#include "ThreadPool.hpp"
#include "Task.hpp"
#include <unistd.h>

int main()
{
    // ThreadPool<Task>* tp = new ThreadPool<Task>();
    // tp->Init();
    // tp->Start();

    int cnt = 7;
    while (cnt--)
    {
        Task t(1,1);
        // tp->Equeue(t);
        ThreadPool<Task>::GetInstance()->Equeue(t);
        LOG(INFO, "equeue a task, %s\n", t.debug().c_str());
        sleep(1);
    }

    ThreadPool<Task>::GetInstance()->Stop();
    sleep(2);
    return 0;
}